<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>XenC: SourcePhrase Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">XenC
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Open-source tool for data selection in NLP</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_source_phrase-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SourcePhrase Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class holding a merged source phrase and all associated data.  
 <a href="class_source_phrase.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="sourcephrase_8h_source.html">sourcephrase.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0b2dd2e97fedbb3d8ba6b67458bb799f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#a0b2dd2e97fedbb3d8ba6b67458bb799f">SourcePhrase</a> (std::string src)</td></tr>
<tr class="memdesc:a0b2dd2e97fedbb3d8ba6b67458bb799f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor from a string.  <a href="#a0b2dd2e97fedbb3d8ba6b67458bb799f">More...</a><br /></td></tr>
<tr class="separator:a0b2dd2e97fedbb3d8ba6b67458bb799f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad429dcc08093435d08ec3905f7255caf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#ad429dcc08093435d08ec3905f7255caf">~SourcePhrase</a> ()</td></tr>
<tr class="memdesc:ad429dcc08093435d08ec3905f7255caf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <a href="#ad429dcc08093435d08ec3905f7255caf">More...</a><br /></td></tr>
<tr class="separator:ad429dcc08093435d08ec3905f7255caf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e16718735a86126d9ef5a20e8a6e43b"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#a2e16718735a86126d9ef5a20e8a6e43b">getSource</a> () const </td></tr>
<tr class="memdesc:a2e16718735a86126d9ef5a20e8a6e43b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor to the source phrase.  <a href="#a2e16718735a86126d9ef5a20e8a6e43b">More...</a><br /></td></tr>
<tr class="separator:a2e16718735a86126d9ef5a20e8a6e43b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d21a7401aec2170e1495a9891505f27"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#a1d21a7401aec2170e1495a9891505f27">getTargetSize</a> () const </td></tr>
<tr class="memdesc:a1d21a7401aec2170e1495a9891505f27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor to the size of the target phrases associated to the source phrase.  <a href="#a1d21a7401aec2170e1495a9891505f27">More...</a><br /></td></tr>
<tr class="separator:a1d21a7401aec2170e1495a9891505f27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac3e475efcc4c258024a8aee5dc45f6d"><td class="memItemLeft" align="right" valign="top">boost::shared_ptr&lt; <a class="el" href="class_score.html">Score</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#aac3e475efcc4c258024a8aee5dc45f6d">getScoresXE</a> () const </td></tr>
<tr class="memdesc:aac3e475efcc4c258024a8aee5dc45f6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor to the vector of cross-entropy scores for the target phrases.  <a href="#aac3e475efcc4c258024a8aee5dc45f6d">More...</a><br /></td></tr>
<tr class="separator:aac3e475efcc4c258024a8aee5dc45f6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaec171f591bb7e3e2c745757fb24bde"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#aaaec171f591bb7e3e2c745757fb24bde">addTarget</a> (std::string s)</td></tr>
<tr class="memdesc:aaaec171f591bb7e3e2c745757fb24bde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associates a target phrase to the source phrase.  <a href="#aaaec171f591bb7e3e2c745757fb24bde">More...</a><br /></td></tr>
<tr class="separator:aaaec171f591bb7e3e2c745757fb24bde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f34613ddb8474b0ff263e03505ce3c8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#a4f34613ddb8474b0ff263e03505ce3c8">addScores</a> (std::string s)</td></tr>
<tr class="memdesc:a4f34613ddb8474b0ff263e03505ce3c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associates a phrase table scores sequence to the source phrase.  <a href="#a4f34613ddb8474b0ff263e03505ce3c8">More...</a><br /></td></tr>
<tr class="separator:a4f34613ddb8474b0ff263e03505ce3c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28d577d9675171fbf3048d0aeaf6cc78"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#a28d577d9675171fbf3048d0aeaf6cc78">addAlignments</a> (std::string s)</td></tr>
<tr class="memdesc:a28d577d9675171fbf3048d0aeaf6cc78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associates alignments to the source phrase.  <a href="#a28d577d9675171fbf3048d0aeaf6cc78">More...</a><br /></td></tr>
<tr class="separator:a28d577d9675171fbf3048d0aeaf6cc78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a524e702b0b75bafaacabf95121d929df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_source_phrase.html#a524e702b0b75bafaacabf95121d929df">addCounts</a> (std::string s)</td></tr>
<tr class="memdesc:a524e702b0b75bafaacabf95121d929df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associates counts to the source phrase.  <a href="#a524e702b0b75bafaacabf95121d929df">More...</a><br /></td></tr>
<tr class="separator:a524e702b0b75bafaacabf95121d929df"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class holding a merged source phrase and all associated data. </p>
<p>This class holds a merged source phrase from a <a class="el" href="class_phrase_table.html" title="Class handling phrase-table related functionalities. ">PhraseTable</a>, along with target phrases, scores, alignments and counts. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a0b2dd2e97fedbb3d8ba6b67458bb799f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SourcePhrase::SourcePhrase </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor from a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>: string representing the source phrase </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad429dcc08093435d08ec3905f7255caf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SourcePhrase::~SourcePhrase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a28d577d9675171fbf3048d0aeaf6cc78"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SourcePhrase::addAlignments </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Associates alignments to the source phrase. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>: the alignments to add to the source phrase </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_source_phrase_a28d577d9675171fbf3048d0aeaf6cc78_icgraph.png" border="0" usemap="#class_source_phrase_a28d577d9675171fbf3048d0aeaf6cc78_icgraph" alt=""/></div>
<map name="class_source_phrase_a28d577d9675171fbf3048d0aeaf6cc78_icgraph" id="class_source_phrase_a28d577d9675171fbf3048d0aeaf6cc78_icgraph">
<area shape="rect" id="node2" href="class_phrase_table.html#a131e70dc06b4d9bdda8f566f43714600" title="Accessor to the size of the PhraseTable. " alt="" coords="255,5,402,31"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a524e702b0b75bafaacabf95121d929df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SourcePhrase::addCounts </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Associates counts to the source phrase. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>: the counts to add to the source phrase </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_source_phrase_a524e702b0b75bafaacabf95121d929df_icgraph.png" border="0" usemap="#class_source_phrase_a524e702b0b75bafaacabf95121d929df_icgraph" alt=""/></div>
<map name="class_source_phrase_a524e702b0b75bafaacabf95121d929df_icgraph" id="class_source_phrase_a524e702b0b75bafaacabf95121d929df_icgraph">
<area shape="rect" id="node2" href="class_phrase_table.html#a131e70dc06b4d9bdda8f566f43714600" title="Accessor to the size of the PhraseTable. " alt="" coords="231,5,378,31"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a4f34613ddb8474b0ff263e03505ce3c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SourcePhrase::addScores </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Associates a phrase table scores sequence to the source phrase. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>: the scores sequence to add to the source phrase </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_source_phrase_a4f34613ddb8474b0ff263e03505ce3c8_icgraph.png" border="0" usemap="#class_source_phrase_a4f34613ddb8474b0ff263e03505ce3c8_icgraph" alt=""/></div>
<map name="class_source_phrase_a4f34613ddb8474b0ff263e03505ce3c8_icgraph" id="class_source_phrase_a4f34613ddb8474b0ff263e03505ce3c8_icgraph">
<area shape="rect" id="node2" href="class_phrase_table.html#a131e70dc06b4d9bdda8f566f43714600" title="Accessor to the size of the PhraseTable. " alt="" coords="230,5,378,31"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aaaec171f591bb7e3e2c745757fb24bde"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SourcePhrase::addTarget </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Associates a target phrase to the source phrase. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>: the target phrase to add to the source phrase </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_source_phrase_aaaec171f591bb7e3e2c745757fb24bde_icgraph.png" border="0" usemap="#class_source_phrase_aaaec171f591bb7e3e2c745757fb24bde_icgraph" alt=""/></div>
<map name="class_source_phrase_aaaec171f591bb7e3e2c745757fb24bde_icgraph" id="class_source_phrase_aaaec171f591bb7e3e2c745757fb24bde_icgraph">
<area shape="rect" id="node2" href="class_phrase_table.html#a131e70dc06b4d9bdda8f566f43714600" title="Accessor to the size of the PhraseTable. " alt="" coords="226,5,373,31"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aac3e475efcc4c258024a8aee5dc45f6d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boost::shared_ptr&lt; <a class="el" href="class_score.html">Score</a> &gt; SourcePhrase::getScoresXE </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accessor to the vector of cross-entropy scores for the target phrases. </p>
<dl class="section return"><dt>Returns</dt><dd>a shared pointer on a <a class="el" href="class_score.html" title="Class holding the XenC scores representation. ">Score</a> object containing the scores </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_source_phrase_aac3e475efcc4c258024a8aee5dc45f6d_icgraph.png" border="0" usemap="#class_source_phrase_aac3e475efcc4c258024a8aee5dc45f6d_icgraph" alt=""/></div>
<map name="class_source_phrase_aac3e475efcc4c258024a8aee5dc45f6d_icgraph" id="class_source_phrase_aac3e475efcc4c258024a8aee5dc45f6d_icgraph">
<area shape="rect" id="node2" href="class_p_t_scoring.html#a51b8eadcb3b7fa0264c09b3a0908f2c0" title="Function in charge of launching the filtering mode. " alt="" coords="431,5,561,31"/>
<area shape="rect" id="node3" href="class_xen_i_o.html#a6c32040f72b5d39ead7b08874beb65a3" title="Writes a new rescored phrase&#45;table. " alt="" coords="244,31,383,56"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a2e16718735a86126d9ef5a20e8a6e43b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string SourcePhrase::getSource </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accessor to the source phrase. </p>
<dl class="section return"><dt>Returns</dt><dd>the source phrase </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_source_phrase_a2e16718735a86126d9ef5a20e8a6e43b_icgraph.png" border="0" usemap="#class_source_phrase_a2e16718735a86126d9ef5a20e8a6e43b_icgraph" alt=""/></div>
<map name="class_source_phrase_a2e16718735a86126d9ef5a20e8a6e43b_icgraph" id="class_source_phrase_a2e16718735a86126d9ef5a20e8a6e43b_icgraph">
<area shape="rect" id="node2" href="class_phrase_table.html#a131e70dc06b4d9bdda8f566f43714600" title="Accessor to the size of the PhraseTable. " alt="" coords="227,5,375,31"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a1d21a7401aec2170e1495a9891505f27"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int SourcePhrase::getTargetSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accessor to the size of the target phrases associated to the source phrase. </p>
<dl class="section return"><dt>Returns</dt><dd>the size of the target phrases vector </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_source_phrase_a1d21a7401aec2170e1495a9891505f27_icgraph.png" border="0" usemap="#class_source_phrase_a1d21a7401aec2170e1495a9891505f27_icgraph" alt=""/></div>
<map name="class_source_phrase_a1d21a7401aec2170e1495a9891505f27_icgraph" id="class_source_phrase_a1d21a7401aec2170e1495a9891505f27_icgraph">
<area shape="rect" id="node2" href="class_p_t_scoring.html#a51b8eadcb3b7fa0264c09b3a0908f2c0" title="Function in charge of launching the filtering mode. " alt="" coords="248,5,378,31"/>
</map>
</div>
</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/<a class="el" href="sourcephrase_8h_source.html">sourcephrase.h</a></li>
<li>src/<a class="el" href="sourcephrase_8cpp.html">sourcephrase.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 18 2016 17:22:37 for XenC by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
